<template>
    <div id="app">
        <!--<keep-alive exclude='privateAlbumRequests,requestedMyPhoto,deleteProfile,permission,changeUsername,shareMoments'>-->
        <keep-alive>
            <router-view></router-view>
        </keep-alive>
    </div>
</template>
<script>

import globalMixin from '@/common/global-mixin';
export default {
    name: 'App',
    mixins: [globalMixin],

    create() {
        //网络连接监听
        window.addEventListener('online', function() {
            let arr = tthis.$children;
            for (let i in arr) {
                if (arr[i].onOnline) {
                    arr[i].onOnline();
                }
            }
        });
        //网络断开监听
        window.addEventListener('offline', function() {
            let arr = tthis.$children;
            for (let i in arr) {
                if (arr[i].onOffline) {
                    arr[i].onOffline();
                }
            }
        });
    },

    mounted() {
        //判断是否登录，然后根据登录的角色来加载配置菜单
        if (true) {
            this.addMenuList('base');
        }
    }
};
</script>
<style>
#app {
    width: 100%;
    height: 100%;
    position: absolute;
}
</style>


